<?php
/**
 * 用户注册逻辑
 * Enter description here ...
 * @package User
 * @author chengtao
 *
 */
class Register{
	/**
	 * 用户注册
	 * @return array(flag,msg)
	 * 0 成功
	 * 1 失败
	 * 
	 */
	public function reg(){
		$User = D('User');
		if($User->create()){
			$User->add();
		}else{
			return array('flag'=>1,'msg'=>$User->getError());
		}
	}
}
?>